/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.hutech09.jsale.entity;

import java.io.Serializable;

/**
 *
 * @author Nam
 */
public class OrderDetailId implements Serializable {

    private Long pOrder;

    private Long product;

    public OrderDetailId(Long pOrder, Long product) {
        this.pOrder = pOrder;
        this.product = product;
    }

    public OrderDetailId() {
    }

    public Long getpOrder() {
        return pOrder;
    }

    public void setpOrder(Long pOrder) {
        this.pOrder = pOrder;
    }

    public Long getProduct() {
        return product;
    }

    public void setProduct(Long product) {
        this.product = product;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        if (pOrder != null) {
            hash += pOrder.hashCode();
        }
        if (product != null) {
            hash += product.hashCode();
        }
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (!(obj instanceof OrderDetailId)) {
            return false;
        }
        OrderDetailId id = (OrderDetailId) obj;
        if (pOrder == id.pOrder && product == id.product) {
            return true;
        }
        return false;
    }
}
